<?php
include_once '../model.php';

header("Content-type: application/csv");
header("Content-Disposition: attachment; filename=export.csv");
header("Pragma: no-cache");
header("Expires: 0");


$urlxml = "../resources/config.xml";
$config= new SimpleXmlElement($urlxml,1,true);

$host = $config->database->host;
$dbname = $config->database->name;
$user = $config->database->user;
$pass = $config->database->password;

$model = new Model($host,$dbname,$user,$pass);

$model->exportCsv();

?>